import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
	state: {
		loginState: false, //登录状态
		shopInfo:{},
		orderInfo:'', //扫码订单信息
		isDispatching:'', //是否是派送商家
		orderParameter:'', //订单参数 订单列表页数据传输
		orderNumber:'', //订单编号 跳转详情页面使用
		md5:'' ,//订单编号 跳转详情页面使用
		type:''
	},
	mutations: {
		login(state, provider) {
			state.loginState = true;
			state.shopInfo = provider;
			uni.setStorageSync("shopInfo",provider)
		},
		
		logout(state) {
			state.loginState = false;
			state.shopInfo = '';
			uni.removeStorageSync("shopInfo")
		}
	}
})
export default store
